﻿
@{
    ViewBag.Title = "CloneButton";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<script>
    var moduleId = $.request("moduleId");
    $(function () {
        $("#itemTree").treeview({
            showcheck: true,
            url: "/ModuleButton/GetCloneButtonTreeJson"
        });
    });
    function submitForm() {
        var Ids = $("#itemTree").getCheckedNodes();
        $.submitForm({
            url: "/ModuleButton/SubmitCloneButton",
            param: { moduleId: moduleId, Ids: String(Ids) },
            success: function () {
                top.modulebutton.$("#gridList").resetSelection();
                top.modulebutton.$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>

<div style="margin: 10px;">
    <div id="itemTree"></div>
</div>

